class Animal:
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def eat(self):
        print(f"{self.name},{self.age}岁，吃东西,Animal")
    def sleep(self):
        print(f"{self.name},{self.age}岁，睡觉,Animal")
    def __str__(self):
        return f"姓名：{self.name},{self.age}岁,Animal"

class Dog(Animal):
    def catch(self):
        print(f"{self.name},{self.age}岁，抓东西,Dog")

class Cat(Animal):
    def eat(self):
        print("吃的很香,Cat")
class Cat_dark(Cat):
    def eat(self):
        print("黑猫警长在吃东西,Cat_dark")
if __name__ == '__main__':
    dog = Dog("niko",20)
    print(dog)
    dog.eat()
    dog.sleep()
    dog.catch()
    cat = Cat("nike",20)
    print(cat)
    cat.eat()
    cat_dark = Cat_dark("nini",20)
    print(cat_dark)
    cat_dark.eat()
    cat_dark.sleep()